Skip to content

test(dashboards): Switch EventsSearchBar test to use paste#110223

Merged
scttcper merged 2 commits intomasterfrom
scttcper/attempt-to-fix-EventsSearchBar-flake
Mar 9, 2026
Merged

test(dashboards): Switch EventsSearchBar test to use paste#110223
scttcper merged 2 commits intomasterfrom
scttcper/attempt-to-fix-EventsSearchBar-flake

Conversation

@scttcper
Copy link
Member

@scttcper scttcper commented Mar 9, 2026

example flake https://github.com/getsentry/sentry/actions/runs/22865175272/job/66329929728 paste sometimes works a bit better because it doesn't have to rerender the complex component on every keyup/keydown that sort of thing. type literally types each character one by one.

example flake https://github.com/getsentry/sentry/actions/runs/22865175272/job/66329929728 paste sometimes works a bit better because it doesn't have to rerender the complex component on every keyup/keydown that sort of thing. type literally types each character one by one.
@scttcper scttcper requested a review from a team March 9, 2026 17:46
@scttcper scttcper requested a review from a team as a code owner March 9, 2026 17:46
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 9, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

).not.toBeInTheDocument();
await waitFor(() => {
expect(screen.queryByText(/p50/)).not.toBeInTheDocument();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative assertion in waitFor passes vacuously before dropdown loads

Medium Severity

The waitFor wrapping expect(screen.queryByText(/p50/)).not.toBeInTheDocument() succeeds immediately because /p50/ isn't on screen yet — including before the dropdown has even loaded. The original code used within(screen.getByRole('listbox')) which implicitly asserted the dropdown was present before checking the negative condition. Now the test can pass vacuously even if the paste doesn't trigger the dropdown at all, meaning the test no longer validates the actual feature behavior.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not a great test

@scttcper scttcper enabled auto-merge (squash) March 9, 2026 18:03
@scttcper scttcper merged commit b68c2f6 into master Mar 9, 2026
59 checks passed
@scttcper scttcper deleted the scttcper/attempt-to-fix-EventsSearchBar-flake branch March 9, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants